home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / AppleShare IP 6.3 SDK / ASIP Server Controls⁄Events / Headers / AppleShareFileServerControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-01  |  35.1 KB  |  1,088 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        AppleShareFileServerControl.h
  3.  
  4.      Contains:    Interface definitions for Server Control calls, and Server Event constants;
  5.  
  6.      Version:    Technology:    AppleShare IP 6.0
  7.                  Release:    ASIP 6.2 SDK - Wednesday, August 25, 1999 09:29:55
  8.  
  9.      Copyright:    © 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLESHAREFILESERVERCONTROL__
  18. #define __APPLESHAREFILESERVERCONTROL__
  19.  
  20. #ifndef __APPLETALK__
  21. #include <AppleTalk.h>
  22. #endif
  23.  
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27.  
  28. #ifndef __MIXEDMODE__
  29. #include <MixedMode.h>
  30. #endif
  31.  
  32. #ifndef __TRAPS__
  33. #include <Traps.h>
  34. #endif
  35.  
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. /* Server Control Codes ---------------------------------------------------------------------------- */
  60. enum {
  61.     kSCStartServer                = 0,                            /* Use StartParam variant */
  62.     kSCShutDown                    = 2,                            /* Use DisconnectParam variant */
  63.     kSCCancelShutDown            = 3,                            /* Use DisconnectParam variant */
  64.     kSCDisconnect                = 4,                            /* Use DisconnectParam variant */
  65.     kSCPollServer                = 5,                            /* Use PollServerParam variant */
  66.     kSCGetExpFldr                = 6,                            /* Use StandardParam variant */
  67.     kSCGetSetupInfo                = 7,                            /* Use SetupParam variant */
  68.     kSCSetSetupInfo                = 8,                            /* Use SetupParam variant */
  69.     kSCSendMessage                = 9,                            /* Use DisconnectParam variant */
  70.     kSCGetServerStatus            = 10,                            /* Use StatusParam variant */
  71.     kSCInstallServerEventProc    = 11,                            /* Use ServerEventParam variant */
  72.     kSCRemoveServerEventProc    = 12,                            /* Use ServerEventParam variant */
  73.     kSCGetServerEventProc        = 13,                            /* Use ServerEventParam variant */
  74.     kSCServerVersion            = 14,                            /* Use VersionParam variant */
  75.     kSCSetCopyProtect            = 16,                            /* Use StandardParam variant */
  76.     kSCClrCopyProtect            = 17,                            /* Use StandardParam variant */
  77.     kSCDisconnectVolUsers        = 18,                            /* Use DisconnectParam variant */
  78.     kSCGetUserNameRec            = 19,                            /* Use UserInfoParam variant */
  79.     kSCGetUserMountInfo            = 20,                            /* Use VolMountedParam variant */
  80.     kSCWakeServer                = 21,                            /* Use StartParam variant */
  81.     kSCSleepServer                = 22,                            /* Use DisconnectParam variant */
  82.     kSCGetCacheStats            = 23,                            /* Use GetCacheStatsParam variant */
  83.     kSCResetCache                = 31,                            /* Use ResetCacheParam variant */
  84.     kSCGetExtUserNameRec        = 35,                            /* Use ExtUserInfoParam variant */
  85.     kSCServiceStateInfo            = 38,                            /* Use ServiceStateParam variant */
  86.     kSCGetPlugInInfo            = 41,                            /* Use PlugInInfoParam variant */
  87.     kSCGetPlugInMimeType        = 42,                            /* Use PlugInMimeTypeParam variant */
  88.     kSCSetHistorySampleTime        = 43,                            /* Use SetHistoryParam variant */
  89.     kSCGetServerActivityHistory    = 44,                            /* Use GetHistoryParam variant*/
  90.     kSCGetSMBConfig                = 46,                            /* Use SMBConfigParam variant*/
  91.     kSCBlockGetUserList            = 47                            /* Use BlockUserRecParam variant*/
  92. };
  93.  
  94. /* General Constants ------------------------------------------------------------------------------- */
  95. /* PollServer scServerState responses... */
  96. enum {
  97.     kSCPollRunning                = -1,
  98.     kSCPollStartingUp            = -2,
  99.     kSCPollJustDisabled            = -3,
  100.     kSCPollDisabledErr            = -4,
  101.     kSCPollSleeping                = -5
  102. };
  103.  
  104. /* PollServer scDisconnectState responses... */
  105. enum {
  106.     kSCNotDisconnecting            = -1,
  107.     kSCDisconnectWithin29Secs    = 0,
  108.     kSCDisconnect30To89Secs        = 1                                /* Any other value is the number of minutes remaining, rounded... */
  109. };
  110.  
  111. /* PollServer scServerErrors responses... */
  112. enum {
  113.     kSCModernMemMgrOffErr        = 1,                            /* Must run with Modern Memory Manager */
  114.     kSCNoThreadLibraryErr        = 2,
  115.     kSCServiceNotInstalledErr    = 3,
  116.     kSCInsuffMFMemErr            = 4,
  117.     kSCCantRegNameErr            = 5,
  118.     kSCCantFindExtnFolderErr    = 6,
  119.     kSCUnExATalkErr                = 7,
  120.     kSCNoMachineNameErr            = 8,
  121.     kSCCantFindFSExtnErr        = 9,
  122.     kSCATalkOffErr                = 10,
  123.     kSCNoInitRunErr                = 12,
  124.     kSCInsuffAppMemErr            = 14,
  125.     kSCBadConfigErr                = 15,
  126.     kSCNoDTOnStartupErr            = 16,
  127.     kSCDupNameErr                = 17,
  128.     kSCBadFileBufParmsErr        = 19,
  129.     kSCNeedRootUserErr            = 20,                            /* The range 21-28 are reserved for future use by Apple. */
  130.     kSCBadSerialNumErr            = 29,
  131.     kSCSysTooOldErr                = 34,
  132.     kSCDupSerialNumberErr        = 36,                            /* NBP dup serial number detected */
  133.     kSCVMOnErr                    = 37,                            /* Virtual Memory is turned on on server machine */
  134.     kSCNoPPCErr                    = 38,                            /* Server only runs on a ppc machine */
  135.     kSCBadInitErr                = 39,
  136.     kSCOpenTransportInstallErr    = 40,                            /* Incompatible version of Open Transport */
  137.     kSCNoAgentLibErr            = 41,                            /* No ASRLib */
  138.     kSCNoAgentSessionErr        = 42,                            /* Could not open an agent session */
  139.     kSCInvalidAgentErr            = 43,                            /* No agent or a problem with the agent */
  140.     kSCAgentServerObjErr        = 44,                            /* Bad server object type. */
  141.     kSCAgentGenesisErr            = 46,
  142.     kSCAlreadyShuttingDown        = -1,
  143.     kSCAlreadyDisconnecting        = -2,
  144.     kSCDeletedPDSErr            = -2,
  145.     kSCContainsExpFolderErr        = -3,
  146.     kSCCantPrepareVolumeErr        = -4,
  147.     kSCTooManyExpFoldersErr        = -5,
  148.     kSCFixedPDSErr                = -6,
  149.     kSCExpFolderNamConfErr        = -7,
  150.     kSCNoExportFolderErr        = -8,
  151.     kSCInsideExpFolderErr        = -9,
  152.     kSCInsideTrashErr            = -10,
  153.     kSCVolNameConflictErr        = -11,
  154.     kSCCacheReducedErr            = -12,
  155.     kSCBadIPConfigErr            = -20,
  156.     kSCBadAccessPrivRecErr        = -21,
  157.     kSCBadMimeTypeFileErr        = -22,
  158.     kSCDuplicateVolumeErr        = -23,                            /* Second volume with same name will not be shared */
  159.                                                                 /* -100 to -199 are AFP errors */
  160.     kSCAFPGenErr                = -100,
  161.     kSCAFPTCPGenErr                = -150,
  162.     kSCAFPTCPMemErr                = -151,
  163.     kSCAFPTCPPortInUseErr        = -152,                            /* -200 to -299 are FTP errors */
  164.     kSCFTPGenErr                = -200,
  165.     kSCFTPPortInUseErr            = -201,
  166.     kSCFTPNotAvailErr            = -202,
  167.     kSCFTPMemErr                = -203,                            /* -300 to -399 are Web errors */
  168.     kSCHTTPGenErr                = -300,
  169.     kSCHTTPPortInUseErr            = -302,
  170.     kSCHTTPFolderErr            = -303,
  171.     kSCHTTPFileErr                = -304,
  172.     kSCHTTPMemErr                = -305,
  173.     kSCHTTPNoMimeTypesErr        = -306,
  174.     kSCHTTPNoDefaultMimeErr        = -307,
  175.     kSCPluginDirNotFoundErr        = -308,
  176.     kSCPluginMemFullErr            = -309,
  177.     kSCPluginPreProcNotFoundErr    = -310,
  178.     kSCPluginPostProcNotFoundErr = -311,
  179.     kSCErrorPluginNotFoundErr    = -312,
  180.     kSCPluginNotPreProcessorErr    = -313,
  181.     kSCPluginNotPostProcessorErr = -314,
  182.     kSCPluginMemPoolFullErr        = -315,
  183.     kSCPluginOutOfMemoryErr        = -316,
  184.     kSCCorruptedMimeTypesErr    = -317,
  185.     kSCPlugInLoggingErr            = -318,
  186.     kSCPlugInTypeConflictErr    = -319,
  187.     kSCPlugInCannotRegisterErr    = -320,
  188.     kSCPlugInMemSmallErr        = -321,
  189.     kSCWebAdminNetworkErr        = -330,                            /* -400 to -499 are SMB errors  */
  190.     kSCSMBGenErr                = -400,
  191.     kSCSMBPortInUseErr            = -402,
  192.     kSCSMBMemErr                = -405
  193. };
  194.  
  195. /* Define times for shutdown... */
  196. enum {
  197.     kSCMaxTimer                    = 4094,
  198.     kSCMinTimer                    = 0
  199. };
  200.  
  201. /* Plugin errors (PlugInMimeTypeParam, PlugInInfoParam)... */
  202. enum {
  203.     kSCPlugInNoErr                = 0,
  204.     kSCPlugInWrongVersionErr    = 1,
  205.     kSCPlugInBadIndexErr        = 2,
  206.     kSCPlugInPlugInsNotLoadedErr = 3,
  207.     kSCPlugInBadPlugInRefErr    = 4
  208. };
  209.  
  210. /* Plugin info dimensions (C-strings)... */
  211. enum {
  212.     kSCPlugInNameSize            = 32,
  213.     kSCPlugInAdminURLSize        = 256,
  214.     kSCPlugInVersionStrSize        = 12,
  215.     kSCMimeTypeSize                = 80,
  216.     kSCSuffixSize                = 32
  217. };
  218.  
  219. /* Number of samples in ServerHistoryRec... */
  220. enum {
  221.     kSCMaxDataPoints            = 1024
  222. };
  223.  
  224. /* For siVersion field of SetupInfoRec...*/
  225. enum {
  226.     kSCSetUpRecordVersion        = 3
  227. };
  228.  
  229. /* VersionParam's scServerType contains the server type, which is interpreted as follows: */
  230. enum {
  231.     kSCMFSServerType            = 0x0000,                        /* Macintosh File Sharing */
  232.     kSCAFSServerType            = 0x0001                        /* AppleShare/AppleShare IP File Server */
  233. };
  234.  
  235. #ifndef SCCACHESTATSRECVERS3
  236. #define SCCACHESTATSRECVERS3 1
  237. /* For csVersion field of SCCacheStatsRec... */
  238. enum {
  239.     kSCCacheStatsRecVersion        = 3
  240. };
  241.  
  242. #endif  /* !defined(SCCACHESTATSRECVERS3) */
  243.  
  244. /* Current version number of scFileInfoRec block... */
  245. enum {
  246.     kSCFileInfoRecVersion        = 1
  247. };
  248.  
  249. /* Parameters for the "bitmap" field of ResetCacheParam... */
  250. enum {
  251.     kSCResetFileCache            = 0x0001,
  252.     kSCResetCNodeCache            = 0x0002,
  253.     kSCResetDTCache                = 0x0004,
  254.     kSCShrinkCache                = 0x8000,
  255.     kSCShrinkAllCaches            = 0x8007
  256. };
  257.  
  258. /* For attrVersion field of ExtUserInfoParam... */
  259. enum {
  260.     kSCOldUserAttrRecVersion    = 0,
  261.     kSCUserAttrRecVersion        = 1
  262. };
  263.  
  264. /* Current session layers for scProtocolType field of UserAttrRec... */
  265. enum {
  266.     kSCSessionInvalid            = 0x0000,
  267.     kSCSessionAll                = FOUR_CHAR_CODE('alls'),
  268.     kSCSessionAFP                = FOUR_CHAR_CODE('afp '),
  269.     kSCSessionHTTP                = FOUR_CHAR_CODE('http'),
  270.     kSCSessionFTP                = FOUR_CHAR_CODE('ftp '),
  271.     kSCSessionSMB                = FOUR_CHAR_CODE('smb '),
  272.     kSCSessionNFS                = FOUR_CHAR_CODE('nfs ')
  273. };
  274.  
  275. /* Current transport layers for scTransportType field of UserAttrRec... */
  276. enum {
  277.     kSCTransportATP                = FOUR_CHAR_CODE('atp '),
  278.     kSCTransportTCP                = FOUR_CHAR_CODE('tcp ')
  279. };
  280.  
  281. /* For version field of PlugInInfoParam... */
  282. enum {
  283.     kSCPlugInInfoParamVersion    = 0
  284. };
  285.  
  286. /* For plugInAttributes field of PlugInInfoParam... */
  287. enum {
  288.     kSCAttPreProcessor            = 0x00000001,                    /* works as a preprocessor */
  289.     kSCAttPostProcessor            = 0x00000002,                    /* works as a postprocessor */
  290.     kSCAttFilter                = 0x00000004,                    /* works as filter */
  291.     kSCAttAccessControl            = 0x00000008,                    /* works as access control */
  292.     kSCAttErrorProcessor        = 0x00000010                    /* works as error processor */
  293. };
  294.  
  295. /* Current version number of SCSrvrMsgsRec... */
  296. enum {
  297.     kSCSrvrMsgsRecVersion        = 1
  298. };
  299.  
  300. /* For version field of PlugInMimeTypeParam... */
  301. enum {
  302.     kSCPlugInMimeTypeParamVersion = 0
  303. };
  304.  
  305. /* For version field of BlockUserRecParam...*/
  306. enum {
  307.     kSCBlockGetUserRecObsoleteVersion1 = 1,
  308.     kSCBlockGetUserRecVersion    = 2
  309. };
  310.  
  311. /* Flags for user in BlockUserRecParam...*/
  312. enum {
  313.     kSCFlagUserSleeping            = 0x00000001
  314. };
  315.  
  316. /* Other service states...*/
  317. enum {
  318.     kSCFTPServiceBit            = 0x01,
  319.     kSCSMBServiceBit            = 0x02
  320. };
  321.  
  322. /* Misc params...*/
  323. enum {
  324.     kSCCurrentlyInstalled        = 0,
  325.     kSCUseFinderExtension        = 0,
  326.     kSCStartingEntity            = 1,
  327.     kSCStartingExtension        = 2,
  328.     kSCUseMessagePtr            = 1
  329. };
  330.  
  331. /* Server Event Detail ----------------------------------------------------------------------------- */
  332. /*
  333.    Bit names for the serverEventMask field of ServerEventQEntry; event numbers returned in
  334.    ServerEventRecord... 
  335. */
  336. enum {
  337.     kSCStartAFPRequestEvt        = 0,                            /* also set afpCommandMask for these */
  338.     kSCSendAFPResponseEvt        = 1
  339. };
  340.  
  341. enum {
  342.     kSCServerControlCallEvt        = 4                                /* also set serverControlMask for this */
  343. };
  344.  
  345. enum {
  346.     kSCServerBusyEvt            = 2,
  347.     kSCServerShutdownEvt        = 3,
  348.     kSCShareEvt                    = 5,
  349.     kSCUnShareEvt                = 6,
  350.     kSCSetDirAccessEvt            = 7,
  351.     kSCServerNameChangeEvt        = 8,
  352.     kSCVolumePrepEvt            = 9,
  353.     kSCVolumeUnmountEvt            = 10,
  354.     kSCServerStartupEvt            = 11,
  355.     kSCSessionTornDownEvt        = 12,
  356.     kSCOutOfSequenceEvt            = 13,
  357.     kSCWksClosedSessionEvt        = 14,
  358.     kSCSessionTimedOutEvt        = 15,
  359.     kSCSrvrClosedSessionEvt        = 16,
  360.     kSCExtendedServerEvtRec        = 31
  361. };
  362.  
  363. /* Maximum size of the Buffer in the ServerEventRecord... */
  364. enum {
  365.     kBufferMax                    = 48
  366. };
  367.  
  368.  
  369. struct IPBlock {
  370.     UInt8                             part[4];
  371. };
  372. typedef struct IPBlock                    IPBlock;
  373.  
  374. union UserAddress {
  375.     UInt32                             wholeAddress;
  376.     AddrBlock                         appleTalkAddress;
  377.     IPBlock                         ipAddress;
  378. };
  379. typedef union UserAddress                UserAddress;
  380.  
  381. struct ServerEventRecord {
  382.     SInt32                             eventNumber;
  383.     UInt32                             serverTimeInSeconds;
  384.     SInt16                             result;
  385.     SInt16                             bufferSize;
  386.     char                             buffer[48];
  387.     Str31                             nameStr;
  388.     SInt16                             afpCommand;
  389.     SInt32                             sessionID;
  390.     SInt32                             userID;
  391.     Str31                             userName;
  392.     SInt16                             vRefNum;
  393.     SInt32                             dirID;
  394.     UserAddress                     addr;
  395. };
  396. typedef struct ServerEventRecord        ServerEventRecord;
  397. /* For annexVersion field; set by server to indicate version of record... */
  398. enum {
  399.     kServerEventAnnexVersion6    = 0x06000000
  400. };
  401.  
  402.  
  403. struct ExtendedServerEventRecord {
  404.     SInt32                             eventNumber;
  405.     UInt32                             serverTimeInSeconds;
  406.     SInt16                             result;
  407.     SInt16                             bufferSize;
  408.     char                             buffer[48];
  409.     Str31                             nameStr;
  410.     SInt16                             afpCommand;
  411.     SInt32                             sessionID;
  412.     SInt32                             userID;
  413.     Str31                             userName;
  414.     SInt16                             vRefNum;
  415.     SInt32                             dirID;
  416.     UserAddress                     addr;
  417.     FourCharCode                     transportType;
  418.     UInt32                             annexVersion;
  419. };
  420. typedef struct ExtendedServerEventRecord ExtendedServerEventRecord;
  421. typedef struct ServerEventQEntry         ServerEventQEntry;
  422.  
  423. typedef ServerEventQEntry *                ServerEventQEntryPtr;
  424. typedef CALLBACK_API( void , ServerEventHandlerProcPtr )(ServerEventQEntryPtr entry, ExtendedServerEventRecord *event);
  425. typedef STACK_UPP_TYPE(ServerEventHandlerProcPtr)                 ServerEventHandlerUPP;
  426.  
  427. struct ServerEventQEntry {
  428.     ServerEventQEntryPtr             next;
  429.     SInt16                             queuetype;
  430.     ServerEventHandlerUPP             callBack;
  431.     SInt32                             serverEventMask;
  432.     SInt32                             afpCommandMask[2];
  433.     SInt32                             serverControlMask;
  434. };
  435.  
  436. #if OPAQUE_UPP_TYPES
  437.     EXTERN_API(ServerEventHandlerUPP)
  438.     NewServerEventHandlerUPP       (ServerEventHandlerProcPtr userRoutine);
  439.  
  440.     EXTERN_API(void)
  441.     DisposeServerEventHandlerUPP    (ServerEventHandlerUPP    userUPP);
  442.  
  443. #else
  444.     enum { uppServerEventHandlerProcInfo = 0x000003C0 };             /* pascal no_return_value Func(4_bytes, 4_bytes) */
  445.     #define NewServerEventHandlerUPP(userRoutine)                     (ServerEventHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppServerEventHandlerProcInfo, GetCurrentArchitecture())
  446.     #define DisposeServerEventHandlerUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  447. #endif
  448. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  449. #define NewServerEventHandlerProc(userRoutine)                     NewServerEventHandlerUPP(userRoutine)
  450. /* Server Control Data Structures ------------------------------------------------------------------ */
  451. /*
  452.    Since all calls are made through ServerDispatchSync, ioCompletion is ignored, so this is for
  453.    completeness only..., 
  454. */
  455. typedef UniversalProcPtr                 SCCompletionUPP;
  456.  
  457. struct StartParam {
  458.     QElemPtr                         qLink;                        /*queue link in header*/
  459.     SInt16                             qType;                        /*type byte for safety check*/
  460.     SInt16                             ioTrap;                        /*FS: the Trap*/
  461.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  462.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  463.     OSErr                             ioResult;                    /*result code*/
  464.     SInt32                             reserved;
  465.     SInt16                             reserved2;
  466.     SInt16                             reserved3;
  467.     SInt16                             scCode;
  468.     SInt16                             scStartSelect;
  469.     SInt16                             scEventSelect;
  470.     SInt32                             scWhere;
  471.     SInt32                             scReceiverID;
  472.     SInt32                             scDataType;
  473.     SInt32                             scStartOptions;
  474. };
  475. typedef struct StartParam                StartParam;
  476. typedef StartParam *                    StartParamPtr;
  477.  
  478. struct DisconnectParam {
  479.     QElemPtr                         qLink;                        /*queue link in header*/
  480.     SInt16                             qType;                        /*type byte for safety check*/
  481.     SInt16                             ioTrap;                        /*FS: the Trap*/
  482.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  483.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  484.     OSErr                             ioResult;                    /*result code*/
  485.     SInt32 *                        scDiscArrayPtr;
  486.     SInt16                             scArrayCount;
  487.     SInt16                             reserved;
  488.     SInt16                             scCode;
  489.     SInt16                             scNumMinutes;
  490.     SInt16                             scFlags;
  491.     StringPtr                         scMessagePtr;
  492. };
  493. typedef struct DisconnectParam            DisconnectParam;
  494. typedef DisconnectParam *                DisconnectParamPtr;
  495.  
  496. struct PollServerParam {
  497.     QElemPtr                         qLink;                        /*queue link in header*/
  498.     SInt16                             qType;                        /*type byte for safety check*/
  499.     SInt16                             ioTrap;                        /*FS: the Trap*/
  500.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  501.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  502.     OSErr                             ioResult;                    /*result code*/
  503.     SInt32                             reserved;
  504.     SInt16                             reserved2;
  505.     SInt16                             reserved3;
  506.     SInt16                             scCode;
  507.     SInt16                             scServerState;
  508.     SInt16                             scDisconnectState;
  509.     SInt16                             scServerError;
  510.     SInt32                             scSecondsLeft;
  511. };
  512. typedef struct PollServerParam            PollServerParam;
  513. typedef PollServerParam *                PollServerParamPtr;
  514.  
  515. struct StandardParam {
  516.     QElemPtr                         qLink;                        /*queue link in header*/
  517.     SInt16                             qType;                        /*type byte for safety check*/
  518.     SInt16                             ioTrap;                        /*FS: the Trap*/
  519.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  520.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  521.     OSErr                             ioResult;                    /*result code*/
  522.     StringPtr                         scNamePtr;
  523.     SInt16                             scVRefNum;
  524.     SInt16                             scLogins;
  525.     SInt16                             scCode;
  526.     SInt16                             scIndex;
  527.     SInt32                             scDirID;
  528. };
  529. typedef struct StandardParam            StandardParam;
  530. typedef StandardParam *                    StandardParamPtr;
  531.  
  532. typedef unsigned char                     Str198[199];
  533.  
  534. struct SetupInfoRec {
  535.     SInt16                             siVersion;
  536.     SInt16                             siFlags;
  537.     SInt16                             siMaxLogins;
  538.     SInt16                             siSrvrUsageLimit;
  539.     Point                             siVolInfoLocation;
  540.     Boolean                         siVolInfoVisible;
  541.     Boolean                         siReserved1;
  542.     Point                             siUserInfoLocation;
  543.     Boolean                         siUserInfoVisible;
  544.     Boolean                         siReserved2;
  545.     SInt16                             siShutDownMins;
  546.     SInt16                             siCacheControl;                /* no longer used */
  547.     SInt16                             siVolParmsStepSize;
  548.     SInt16                             siVolParmsIncrement;
  549.     SInt16                             siVolParmsFirstDelay;
  550.     SInt16                             siVolParmsMaxDelay;
  551.     SInt32                             siRACacheFileBufSize;        /* no longer used */
  552.     SInt32                             siRACacheSize;                /* no longer used */
  553.     SInt16                             siDirCacheMaxWidth;            /* no longer used */
  554.     SInt32                             siDirCacheSize;                /* no longer used */
  555.     SInt32                             siIconCacheSize;            /* no longer used */
  556.     SInt32                             siBTMemReservedFromCache;
  557.     SInt16                             siSpare[1];                    /* reserved */
  558.     Str198                             siLoginMsg;
  559. };
  560. typedef struct SetupInfoRec                SetupInfoRec;
  561.  
  562. typedef SetupInfoRec *                    SetupInfoPtr;
  563.  
  564. struct SetupParam {
  565.     QElemPtr                         qLink;                        /*queue link in header*/
  566.     SInt16                             qType;                        /*type byte for safety check*/
  567.     SInt16                             ioTrap;                        /*FS: the Trap*/
  568.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  569.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  570.     OSErr                             ioResult;                    /*result code*/
  571.     SetupInfoPtr                     scSetupPtr;
  572.     SInt16                             scMaxVolumes;
  573.     SInt16                             scMaxExpFolders;
  574.     SInt16                             scCode;
  575.     SInt16                             scCurMaxSessions;
  576. };
  577. typedef struct SetupParam                SetupParam;
  578. typedef SetupParam *                    SetupParamPtr;
  579.  
  580. struct StatusParam {
  581.     QElemPtr                         qLink;                        /*queue link in header*/
  582.     SInt16                             qType;                        /*type byte for safety check*/
  583.     SInt16                             ioTrap;                        /*FS: the Trap*/
  584.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  585.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  586.     OSErr                             ioResult;                    /*result code*/
  587.     StringPtr                         scNamePtr;
  588.     SInt16                             reserved2;
  589.     SInt16                             reserved3;
  590.     SInt16                             scCode;
  591.     SInt16                             scServerFlags;
  592.     SInt16                             scNumSessions;
  593.     SInt32                             scUserListModDate;
  594.     SInt16                             scActivity;
  595.     SInt32                             scVolListModDate;
  596. };
  597. typedef struct StatusParam                StatusParam;
  598. typedef StatusParam *                    StatusParamPtr;
  599.  
  600. struct ServerEventParam {
  601.     QElemPtr                         qLink;                        /*queue link in header*/
  602.     SInt16                             qType;                        /*type byte for safety check*/
  603.     SInt16                             ioTrap;                        /*FS: the Trap*/
  604.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  605.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  606.     OSErr                             ioResult;                    /*result code*/
  607.     ServerEventQEntryPtr             scSEQEntryPtr;
  608.     SInt16                             reserved2;
  609.     SInt16                             reserved3;
  610.     SInt16                             scCode;
  611. };
  612. typedef struct ServerEventParam            ServerEventParam;
  613. typedef ServerEventParam *                ServerEventParamPtr;
  614.  
  615. struct VersionParam {
  616.     QElemPtr                         qLink;                        /*queue link in header*/
  617.     SInt16                             qType;                        /*type byte for safety check*/
  618.     SInt16                             ioTrap;                        /*FS: the Trap*/
  619.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  620.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  621.     OSErr                             ioResult;                    /*result code*/
  622.     StringPtr                         scExtNamePtr;
  623.     SInt16                             reserved2;
  624.     SInt16                             reserved3;
  625.     SInt16                             scCode;
  626.     SInt16                             scServerType;
  627.     SInt16                             scServerVersion;
  628. };
  629. typedef struct VersionParam                VersionParam;
  630. typedef VersionParam *                    VersionParamPtr;
  631.  
  632. struct UserInfoParam {
  633.     QElemPtr                         qLink;                        /*queue link in header*/
  634.     SInt16                             qType;                        /*type byte for safety check*/
  635.     SInt16                             ioTrap;                        /*FS: the Trap*/
  636.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  637.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  638.     OSErr                             ioResult;                    /*result code*/
  639.     StringPtr                         scNamePtr;
  640.     SInt16                             reserved2;
  641.     SInt16                             reserved3;
  642.     SInt16                             scCode;
  643.     SInt32                             scPosition;
  644.     SInt32                             scUNRecID;
  645.     SInt32                             scUserID;
  646.     SInt32                             scLoginTime;
  647.     SInt32                             scLastUseTime;
  648.     SInt32                             scSocketNum;
  649. };
  650. typedef struct UserInfoParam            UserInfoParam;
  651. typedef UserInfoParam *                    UserInfoParamPtr;
  652.  
  653. struct VolMountedParam {
  654.     QElemPtr                         qLink;                        /*queue link in header*/
  655.     SInt16                             qType;                        /*type byte for safety check*/
  656.     SInt16                             ioTrap;                        /*FS: the Trap*/
  657.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  658.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  659.     OSErr                             ioResult;                    /*result code*/
  660.     Ptr                             reserved;
  661.     SInt16                             scVRefNum;
  662.     SInt16                             reserved3;
  663.     SInt16                             scCode;
  664.     SInt16                             scFilesOpen;
  665.     SInt16                             scWriteableFiles;
  666.     SInt32                             scUNRecID;
  667.     Boolean                         scMounted;
  668.     Boolean                         scMountedAsOwner;
  669. };
  670. typedef struct VolMountedParam            VolMountedParam;
  671. typedef VolMountedParam *                VolMountedParamPtr;
  672.  
  673. struct SCCacheStatsRec {
  674.     SInt16                             csVersion;
  675.     SInt32                             csCacheTime;
  676.     SInt32                             csRACacheAttempts;            /* file cache */
  677.     SInt32                             csRACacheHits;
  678.     SInt32                             csRACacheTotalEntries;
  679.     SInt32                             csRACacheEntriesInUse;
  680.     SInt32                             csRACacheEntrySize;
  681.     SInt32                             csDirCacheAttempts;            /* dir cache */
  682.     SInt32                             csDirCacheHits;
  683.     SInt32                             csDirCacheTotalEntries;
  684.     SInt32                             csDirCacheEntriesInUse;
  685.     SInt32                             csDirCacheEntrySize;
  686.     SInt32                             csIconCacheAttempts;        /* dt cache */
  687.     SInt32                             csIconCacheHits;
  688.     SInt32                             csIconCacheTotalEntries;
  689.     SInt32                             csIconCacheEntriesInUse;
  690.     SInt32                             csIconCacheEntrySize;
  691.     SInt32                             csACtlCacheAttempts;        /* PDS info, part of dir cache */
  692.     SInt32                             csACtlCacheHits;
  693.     SInt32                             csACtlCacheTotalEntries;
  694.     SInt32                             csACtlCacheEntriesInUse;
  695.     SInt32                             csACtlCacheEntrySize;
  696.     SInt32                             csAUXCacheAttempts;            /* not used */
  697.     SInt32                             csAUXCacheHits;
  698.     SInt32                             csAUXCacheTotalEntries;
  699.     SInt32                             csAUXCacheEntriesInUse;
  700.     SInt32                             csAUXCacheEntrySize;
  701.                                                                 /*  New fields for version 3 record*/
  702.     SInt32                             csEnumCacheAttempts;
  703.     SInt32                             csEnumCacheHits;
  704.     SInt32                             csEnumCacheTotalEntries;
  705.     SInt32                             csEnumCacheEntriesInUse;
  706.     SInt32                             csEnumCacheEntrySize;
  707.     SInt32                             csMaxFBUsed;
  708.     SInt32                             csSkipPrsAttempts;
  709.     SInt32                             csSkipPrsHits;
  710. };
  711. typedef struct SCCacheStatsRec            SCCacheStatsRec;
  712. typedef SCCacheStatsRec *                SCCacheStatsRecPtr;
  713.  
  714. struct SCOldCacheStatsRec {
  715.     SInt16                             csVersion;
  716.     SInt32                             csCacheTime;
  717.     SInt32                             csRACacheAttempts;            /* file cache */
  718.     SInt32                             csRACacheHits;
  719.     SInt32                             csRACacheTotalEntries;
  720.     SInt32                             csRACacheEntriesInUse;
  721.     SInt32                             csRACacheEntrySize;
  722.     SInt32                             csDirCacheAttempts;            /* dir cache */
  723.     SInt32                             csDirCacheHits;
  724.     SInt32                             csDirCacheTotalEntries;
  725.     SInt32                             csDirCacheEntriesInUse;
  726.     SInt32                             csDirCacheEntrySize;
  727.     SInt32                             csIconCacheAttempts;        /* dt cache */
  728.     SInt32                             csIconCacheHits;
  729.     SInt32                             csIconCacheTotalEntries;
  730.     SInt32                             csIconCacheEntriesInUse;
  731.     SInt32                             csIconCacheEntrySize;
  732.     SInt32                             csACtlCacheAttempts;        /* PDS info, part of dir cache */
  733.     SInt32                             csACtlCacheHits;
  734.     SInt32                             csACtlCacheTotalEntries;
  735.     SInt32                             csACtlCacheEntriesInUse;
  736.     SInt32                             csACtlCacheEntrySize;
  737.     SInt32                             csAUXCacheAttempts;            /* not used */
  738.     SInt32                             csAUXCacheHits;
  739.     SInt32                             csAUXCacheTotalEntries;
  740.     SInt32                             csAUXCacheEntriesInUse;
  741.     SInt32                             csAUXCacheEntrySize;
  742. };
  743. typedef struct SCOldCacheStatsRec        SCOldCacheStatsRec;
  744. typedef SCOldCacheStatsRec *            SCOldCacheStatsRecPtr;
  745.  
  746. struct GetCacheStatsParam {
  747.     QElemPtr                         qLink;                        /*queue link in header*/
  748.     SInt16                             qType;                        /*type byte for safety check*/
  749.     SInt16                             ioTrap;                        /*FS: the Trap*/
  750.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  751.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  752.     OSErr                             ioResult;                    /*result code*/
  753.     Ptr                             reserved;
  754.     SInt16                             reserved2;
  755.     SInt16                             reserved3;
  756.     SInt16                             scCode;
  757.     SInt16                             reserved4;
  758.     SCCacheStatsRecPtr                 scCacheStatsPtr;
  759.     SInt16                             scCacheStatsReqSize;
  760.     SInt16                             scCacheStatsActSize;
  761. };
  762. typedef struct GetCacheStatsParam        GetCacheStatsParam;
  763. typedef GetCacheStatsParam *            GetCacheStatsParamPtr;
  764.  
  765. struct ResetCacheParam {
  766.     QElemPtr                         qLink;                        /*queue link in header*/
  767.     SInt16                             qType;                        /*type byte for safety check*/
  768.     SInt16                             ioTrap;                        /*FS: the Trap*/
  769.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  770.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  771.     OSErr                             ioResult;                    /*result code*/
  772.     SInt32                             reserved;
  773.     SInt16                             reserved2;
  774.     SInt16                             reserved3;
  775.     SInt16                             scCode;
  776.     SInt16                             bitmap;
  777. };
  778. typedef struct ResetCacheParam            ResetCacheParam;
  779. typedef ResetCacheParam *                ResetCacheParamPtr;
  780. /* Used in extended user call if attrVersion is kOldUserAttrRecVersion... */
  781.  
  782. struct OldUserAttrRec {
  783.     SInt32                             scLoginTime;
  784.     SInt32                             scLastUseTime;
  785.     SInt32                             scSocketNum;
  786.     SInt16                             scConnectionType;
  787.     SInt16                             scDisconnectID;
  788. };
  789. typedef struct OldUserAttrRec            OldUserAttrRec;
  790.  
  791. typedef OldUserAttrRec *                OldUserAttrPtr;
  792. /* Used in extended user call if attrVersion is kUserAttrRecVersion... */
  793.  
  794. struct UserAttrRec {
  795.     SInt32                             scLoginTime;
  796.     SInt32                             scLastUseTime;
  797.     SInt32                             scSocketNum;
  798.     FourCharCode                     scProtocolType;                /* The Session Protocol, i.e. AFP, FTP, SMB */
  799.     FourCharCode                     scTransportType;            /* The Transport, i.e. ATP, TCP/IP */
  800.     StringPtr                         scSessionNamePtr;            /* Str63 */
  801.     SInt32                             scDisconnectID;
  802. };
  803. typedef struct UserAttrRec                UserAttrRec;
  804.  
  805. typedef UserAttrRec *                    UserAttrPtr;
  806.  
  807. struct ExtUserInfoParam {
  808.     QElemPtr                         qLink;                        /*queue link in header*/
  809.     SInt16                             qType;                        /*type byte for safety check*/
  810.     SInt16                             ioTrap;                        /*FS: the Trap*/
  811.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  812.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  813.     OSErr                             ioResult;                    /*result code*/
  814.     StringPtr                         scNamePtr;
  815.     SInt16                             reserved2;
  816.     SInt16                             reserved3;
  817.     SInt16                             scCode;
  818.     SInt32                             scPosition;
  819.     SInt32                             scUNRecID;
  820.     SInt32                             scUserID;
  821.     SInt16                             attrVersion;
  822.     UserAttrPtr                     scUserAttrPtr;
  823. };
  824. typedef struct ExtUserInfoParam            ExtUserInfoParam;
  825. typedef ExtUserInfoParam *                ExtUserInfoParamPtr;
  826.  
  827. struct ServiceStateParam {
  828.     QElemPtr                         qLink;                        /*queue link in header*/
  829.     SInt16                             qType;                        /*type byte for safety check*/
  830.     SInt16                             ioTrap;                        /*FS: the Trap*/
  831.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  832.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  833.     OSErr                             ioResult;                    /*result code*/
  834.     StringPtr                         reserved;
  835.     SInt16                             reserved2;
  836.     SInt16                             reserved3;
  837.     SInt16                             scCode;
  838.     SInt16                             afpTCPState;
  839.     SInt16                             httpState;
  840.     SInt16                             otherState;
  841.     SInt16                             multiHoming;
  842.     SInt16                             srvrUsageLimit;
  843. };
  844. typedef struct ServiceStateParam        ServiceStateParam;
  845. typedef ServiceStateParam *                ServiceStateParamPtr;
  846.  
  847. struct PlugInInfoParam {
  848.     QElemPtr                         qLink;                        /*queue link in header*/
  849.     SInt16                             qType;                        /*type byte for safety check*/
  850.     SInt16                             ioTrap;                        /*FS: the Trap*/
  851.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  852.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  853.     OSErr                             ioResult;                    /*result code*/
  854.     SInt32                             reserved;
  855.     SInt16                             reserved2;
  856.     SInt16                             reserved3;
  857.     SInt16                             scCode;
  858.     SInt16                             version;
  859.     SInt32                             index;
  860.     UInt8                             error;
  861.     UInt8                             reserved4;
  862.     char                             name[32];
  863.     char                             versionStr[12];
  864.     char                             adminURL[256];
  865.     UInt32                             plugInAttributes;
  866.     SInt32                             plugInRef;
  867.     SInt16                             isLast;
  868. };
  869. typedef struct PlugInInfoParam            PlugInInfoParam;
  870. typedef PlugInInfoParam *                PlugInInfoParamPtr;
  871.  
  872. struct PlugInMimeTypeParam {
  873.     QElemPtr                         qLink;                        /*queue link in header*/
  874.     SInt16                             qType;                        /*type byte for safety check*/
  875.     SInt16                             ioTrap;                        /*FS: the Trap*/
  876.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  877.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  878.     OSErr                             ioResult;                    /*result code*/
  879.     SInt32                             reserved;
  880.     SInt16                             reserved2;
  881.     SInt16                             reserved3;
  882.     SInt16                             scCode;
  883.     SInt16                             version;
  884.     SInt32                             plugInRef;
  885.     SInt32                             index;
  886.     UInt8                             error;
  887.     UInt8                             reserved4;
  888.     char                             mimetype[80];
  889.     char                             suffix[32];
  890.     OSType                             typeCode;
  891.     OSType                             creatorCode;
  892.     SInt16                             isLast;
  893. };
  894. typedef struct PlugInMimeTypeParam        PlugInMimeTypeParam;
  895. typedef PlugInMimeTypeParam *            PlugInMimeTypeParamPtr;
  896.  
  897. struct SetHistoryParam {
  898.     QElemPtr                         qLink;                        /*queue link in header*/
  899.     SInt16                             qType;                        /*type byte for safety check*/
  900.     SInt16                             ioTrap;                        /*FS: the Trap*/
  901.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  902.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  903.     OSErr                             ioResult;                    /*result code*/
  904.     SInt32                             reserved;
  905.     SInt16                             reserved2;
  906.     SInt16                             historySampleTime;
  907.     SInt16                             scCode;
  908. };
  909. typedef struct SetHistoryParam            SetHistoryParam;
  910. typedef SetHistoryParam *                SetHistoryParamPtr;
  911.  
  912. struct HistoryData {
  913.     UInt8                             dpMin;
  914.     UInt8                             dpMax;
  915.     UInt8                             dpAverage;
  916.     UInt8                             filler;
  917. };
  918. typedef struct HistoryData                HistoryData;
  919.  
  920. struct ServerHistoryRec {
  921.     UInt32                             historySyncCount;
  922.     UInt32                             historyLastSample;
  923.     UInt16                             historySampleTime;
  924.     UInt16                             numDataPoints;
  925.     HistoryData                     dataPoint[1024];
  926. };
  927. typedef struct ServerHistoryRec            ServerHistoryRec;
  928.  
  929. typedef ServerHistoryRec *                ServerHistoryPtr;
  930.  
  931. struct GetHistoryParam {
  932.     QElemPtr                         qLink;                        /*queue link in header*/
  933.     SInt16                             qType;                        /*type byte for safety check*/
  934.     SInt16                             ioTrap;                        /*FS: the Trap*/
  935.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  936.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  937.     OSErr                             ioResult;                    /*result code*/
  938.     ServerHistoryPtr                 scHistory;
  939.     SInt16                             numDataPointsRequested;
  940.     SInt16                             reserved2;
  941.     SInt16                             scCode;
  942. };
  943. typedef struct GetHistoryParam            GetHistoryParam;
  944. typedef GetHistoryParam *                GetHistoryParamPtr;
  945.  
  946. struct SMBConfigParam {
  947.     QElemPtr                         qLink;                        /*queue link in header*/
  948.     SInt16                             qType;                        /*type byte for safety check*/
  949.     SInt16                             ioTrap;                        /*FS: the Trap*/
  950.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  951.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  952.     OSErr                             ioResult;                    /*result code*/
  953.     UInt32                             reserved;
  954.     UInt32                             reserved2;
  955.     SInt16                             scCode;
  956.     Boolean                         enabled;
  957.     UInt8                             reserved3;
  958.     Str63                             netBIOSName;
  959.     Str63                             workgroupName;
  960.     Str63                             comment;
  961.     Str63                             winsAddress;
  962. };
  963. typedef struct SMBConfigParam            SMBConfigParam;
  964. typedef SMBConfigParam *                SMBConfigParamPtr;
  965. /*
  966.       Do not use the following ObsoleteBlockUserRec structure. This corresponds
  967.       to the original BlockUserRecParam call version (version 1), and has been
  968.       superceeded by version 2 as of May, 1999. The BlockGetUser call will
  969.       honor the old format for binary compatibilty, but you should switch
  970.       to using the most current version. The change is to the field "name",
  971.       which has been switched from type Str32Field to type Str31. This removes
  972.       alignment and padding problems with some compilers, and is more correct.
  973. */
  974.  
  975. struct ObsoleteBlockUserRec1 {
  976.     Str32Field                         name;
  977.     UInt32                             recID;
  978.     UInt32                             id;
  979.     UInt32                             loginTime;
  980.     UInt32                             lastUseTime;
  981.     OSType                             serviceType;
  982.     OSType                             sessionType;
  983.     union {
  984.         AddrBlock                         at;
  985.         UInt32                             ip;
  986.     }                                 address;
  987. };
  988. typedef struct ObsoleteBlockUserRec1    ObsoleteBlockUserRec1;
  989.  
  990. struct BlockUserRec {
  991.     Str31                             name;
  992.     UInt32                             recID;
  993.     UInt32                             id;
  994.     UInt32                             loginTime;
  995.     UInt32                             lastUseTime;
  996.     OSType                             serviceType;
  997.     OSType                             sessionType;
  998.     UInt32                             flags;
  999.     UInt32                             disconnectTimer;
  1000.     union {
  1001.         AddrBlock                         at;
  1002.         UInt32                             ip;
  1003.     }                                 address;
  1004. };
  1005. typedef struct BlockUserRec                BlockUserRec;
  1006.  
  1007. typedef BlockUserRec *                    BlockUserPtr;
  1008.  
  1009. struct BlockUserRecParam {
  1010.     QElemPtr                         qLink;                        /*queue link in header*/
  1011.     SInt16                             qType;                        /*type byte for safety check*/
  1012.     SInt16                             ioTrap;                        /*FS: the Trap*/
  1013.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1014.     SCCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1015.     OSErr                             ioResult;                    /*result code; -39 == more users than buffer*/
  1016.     UInt32                             reserved;
  1017.     UInt32                             reserved2;
  1018.     SInt16                             scCode;
  1019.     UInt32                             version;                    /* Should be kSCBlockGetUserRecVersion. */
  1020.     UInt32                             numUsers;                    /* On input, size of buffer. On output, num users. */
  1021.     BlockUserPtr                     users;                        /* Pointer to array of SUserRecs to be filled in by call. */
  1022. };
  1023. typedef struct BlockUserRecParam        BlockUserRecParam;
  1024. typedef BlockUserRecParam *                BlockUserRecParamPtr;
  1025.  
  1026. union SCParamBlockRec {
  1027.     StartParam                         startParam;
  1028.     DisconnectParam                 disconnectParam;
  1029.     PollServerParam                 pollServerParam;
  1030.     StandardParam                     standardParam;
  1031.     SetupParam                         setupParam;
  1032.     StatusParam                     statusParam;
  1033.     ServerEventParam                 serverEventParam;
  1034.     VersionParam                     versionParam;
  1035.     UserInfoParam                     userInfoParam;
  1036.     VolMountedParam                 volMountedParam;
  1037.     GetCacheStatsParam                 getCacheStatsParam;
  1038.     ResetCacheParam                 resetCacheParam;
  1039.     ExtUserInfoParam                 extUserInfoParam;
  1040.     ServiceStateParam                 serviceStateParam;
  1041.     PlugInInfoParam                 plugInInfoParam;
  1042.     PlugInMimeTypeParam             plugInMimeTypeParam;
  1043.     SetHistoryParam                 setHistoryParam;
  1044.     GetHistoryParam                 getHistoryParam;
  1045.     SMBConfigParam                     smbConfigParam;
  1046.     BlockUserRecParam                 blockGetUserParam;
  1047. };
  1048. typedef union SCParamBlockRec            SCParamBlockRec;
  1049.  
  1050. typedef SCParamBlockRec *                SCParamBlockPtr;
  1051. /* 68K Trap Interface ------------------------------------------------------------------------------ */
  1052.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1053.                                                                                             #pragma parameter __D0 ServerDispatchSync(__A0)
  1054.                                                                                             #endif
  1055. EXTERN_API( OSErr )
  1056. ServerDispatchSync                (SCParamBlockPtr         paramBlock)                            TWOWORDINLINE(0x7000, 0xA094);
  1057.  
  1058. /* Note: there is no ServerDispatchAsync! */
  1059. /* Gestaltage -------------------------------------------------------------------------------------- */
  1060.  
  1061. enum {
  1062.     gestaltASIPFSVersion        = FOUR_CHAR_CODE('#!#7')        /* Defined only from 6.0... */
  1063. };
  1064.  
  1065. /* ------------------------------------------------------------------------------------------------- */
  1066.  
  1067.  
  1068. #if PRAGMA_STRUCT_ALIGN
  1069.     #pragma options align=reset
  1070. #elif PRAGMA_STRUCT_PACKPUSH
  1071.     #pragma pack(pop)
  1072. #elif PRAGMA_STRUCT_PACK
  1073.     #pragma pack()
  1074. #endif
  1075.  
  1076. #ifdef PRAGMA_IMPORT_OFF
  1077. #pragma import off
  1078. #elif PRAGMA_IMPORT
  1079. #pragma import reset
  1080. #endif
  1081.  
  1082. #ifdef __cplusplus
  1083. }
  1084. #endif
  1085.  
  1086. #endif /* __APPLESHAREFILESERVERCONTROL__ */
  1087.  
  1088.